package com.kaka.bus.engine.borrow.idcard;

import android.app.Activity;
import android.content.Intent;

import com.kaka.bus.bean.HttpWrapper;
import com.kaka.bus.bean.IDCardFrontBean;
import com.kaka.bus.mvp.BasePresenter;
import com.kaka.bus.mvp.BaseView;

/**
 * Created by zhangqi on 2016/10/19.
 * e-mail : ${email}
 * desc :
 */

public interface IdCardContract {

    interface View extends BaseView {
        void sendFailed(int type);
        void sendSuccess(HttpWrapper<String> bean);
        void setInfo(byte[] data, IDCardFrontBean idCard);
        void setError(String info);

        void reTakePhoto();

        void uploadContactFaild();

        void uploadContactSuccess(HttpWrapper<String> s);
    }

    interface Presenter extends BasePresenter<View> {
        /**
         * 筛选信息
         * @param resultCode
         * @param data
         */
        void sendPic(int resultCode, Intent data, int frontOrBack,String userId,String token);

        /**
         * 信息提交至服务器
         */
        void sendService(String userId,String token,IDCardFrontBean idCard,String photo,int type);

        void router(Activity activity);

        void uploadContact(String userId, String json);
    }
}
